package frameworks.base
{
	public class BaseModuleController
	{
		private var _modules:Object = {};
		private var _facade:BaseFacade;
		
		public function BaseModuleController(facade:BaseFacade)
		{
			_facade = facade;
		}
		
		public function registerModule(module:IModule, id:String=null):void{
			if(id == null){id = module.view.id;}
			if(_modules[id] != null){throw Error("組件["+id+"]已经存在！");}
			_modules[id] = module;
			module.moduleController = this;
		}
	}
}